-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
disk: Pass /dev/null to containers.attach stdin #59
Conversation
When using os.Stdin, the initial ssh connection pipe is broken. Signed-off-by: Chris Kyrouac <[email protected]>
@cgwalters This seems to behave the same as using os.Stdin on my machine. I don't see any progress bar either way though, so maybe I'm doing something wrong. When using os.Stdin, the initial ssh connection is busted until sending a newline. This is the error:
|
Argh, sorry for the regression here!
You need bootc built from git main with the changes from containers/bootc#655 This is effectively reverting #55 right? I think Hmmm....this makes me think that what's going wrong here is we're not correctly detaching from the container? There's a whole lot going on in podman |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a git revert fedcf86b8796ec9f5fe23dfc748e81708744da6b
is clearer but this is fine too
Tangentially this code is IMO another great example of the superficial simplicity of Go being paid down later...trying to use |
I didn't see that when I tested it, it's true that the e2e test don't run on my machine, for some reason it got killed by the OOM killer |
A famous question asked to the Go team at a conference: "Why did you choose to ignore any research about type systems since the 1970s" |
I briefly dug at this a bit more, and what I think is going on is again a classic Go problem¹. Basically, the In theory, us cancelling the context should terminate all work spawned from the If one just invokes I'm pretty tempted to just switch back to forking off That said, I think we could fix the podman code here by changing it to force close the socket when the context is cancelled. That's the usual way to cancel reads in Go. It's still fundamentally racy though without going to the extra level of having something like a "cancellation complete" channel in this API that synchronously waits for the worker goroutines to exit though. ¹ Yes, yes it's a poor craftsman who blames their tools and to be honest, asynchronous Rust also has its share of traps - and that trap is very much precisely because of how cancellation of an async task is just a simple "drop"...but, at least it's pretty straightforward to audit Rust codebases for use of |
#61 is an alternative fix |
See: - containers/podman-bootc#59 (comment) - containers/podman-bootc#61 Sorry for not trying to fix this, but I am not aware of a remotely straightforward way to do so. Signed-off-by: Colin Walters <[email protected]>
I'm closing this since #61 supersedes it |
When using os.Stdin, the initial ssh connection pipe is broken.